/* 
  Copyright (c) SilverLining 2015
  Date:    2016-1-7
  File:    TextArchiver.h  
  Description: 

*/

#pragma once

namespace SL
{
	namespace M
	{
		namespace Text
		{
			/// <summary>
			/// Represent a text archiver for object data.
			/// </summary>
			public ref class TextArchiver : Archiver
			{
			public:
				TextArchiver();
				~TextArchiver();
				!TextArchiver();

				/// <summary>
				/// Archive the root object.
				/// </summary>
				/// <param name="root">The root object to archive.</param>
				/// <returns>The archived text data.</returns>
				String^ Archive(GameObject^ root);
				/// <summary>
				/// Unarchive the root object.
				/// </summary>
				/// <param name="root">The root object to unarchive, which must have been constructed prior to calling this method.</param>
				/// <param name="data">The data containing the archived object.</param>
				void Unarchive(GameObject^ root, String^ data);

			private:
				m::text::text_buffer* _Buffer;
			};
		}
	}
}
